Use Float::INFINITY; We don't support Ruby 1.8.

Akinori MUSHA 10 years ago
parent
commit
9294a2207d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/helpers/application_helper.rb

+ 1 - 1
app/helpers/application_helper.rb

@@ -83,7 +83,7 @@ module ApplicationHelper
83 83
          when /\A(\d+)\z/
84 84
            i.to_i
85 85
          when /\A(\d+)?-(\d+)?\z/
86
-           ($1 ? $1.to_i : 1)..($2 ? $2.to_i : (1/0.0))
86
+           ($1 ? $1.to_i : 1)..($2 ? $2.to_i : Float::INFINITY)
87 87
          else
88 88
            []
89 89
          end